package com.attilax.xml;

import java.util.List;

import org.dom4j.Element;
import org.jdom2.Document;
import org.jdom2.JDOMException;
import org.jdom2.xpath.XPath;

public class jdomUtil {

	public static org.jdom2.Element selectSingleNode(String string, Document document) throws  Exception {
		  XPath xpath = XPath.newInstance(string);
		     List list = xpath.selectNodes(document);
		     org.jdom2.Element item = (org.jdom2.Element) list.get(0);
		return item;
	}

}
